Data Processing Method and Apparatus, and Fitness Robot

ABSTRACT

A data processing method, apparatus, and a fitness robot relate to the artificial intelligent field, where the data processing method includes calculating first energy consumption of a user in a preset time interval based on exercise data of the user, obtaining a first body weight change of the user in the preset time interval, predicting, based on the first energy consumption and the first body weight change, second energy consumption and a second body weight change of the user in a future preset time interval, obtaining, based on the first energy consumption, the first body weight change, the second energy consumption, and the second body weight change, a result indicating the user capability of completing an intended fitness plan, and correcting specified energy consumption of the user and a specified body weight change of the user in the preset time interval in the intended fitness plan based on the result.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent Application No. PCT/CN2018/076231 filed on Feb. 11, 2018, which claims priority to Chinese Patent Application No. 201710225621.3 filed on Apr. 7, 2017. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to the field of smart fitness technologies, and in particular, to a data processing method and apparatus, and a fitness robot.

BACKGROUND

Some smart fitness products, for example, a wearable fitness product and a portable smart communications terminal with an embedded fitness application (also referred to as APP) can collect fitness data of a user. A few smart fitness products can provide a fitness plan based on a weight-loss goal, a time to lose weight, a personal preference, and the like.

However, a fitness status of a user can hardly be maintained at a constant level due to various factors. Some unexpected events or force majeure may also hinder the user from completing a fitness plan. As a result, an original fitness plan is inapplicable to a status quo of the user, resulting in a failure to complete the fitness plan.

Each time a fitness status is changed, to achieve a fitness goal that is set in the original fitness plan, the user needs to manually adjust the fitness plan. This causes the user to repeatedly input a lot of user information such as an original sign, a time to lose weight, and a personal preference to manually update the fitness plan. In addition, because the fitness plan is changed and is based on new user information, a fitness history of the user is relatively separated. This is inconvenient for tracking a fitness status of the user.

SUMMARY

Embodiments of this application provide a data processing method and apparatus, and a fitness robot in order to adjust a fitness plan of a user in time based on obtained exercise data of the user to ensure smooth achievement of an original fitness goal.

According to a first aspect, a data processing method is provided, where the method may include calculating energy consumption of a user in a preset time interval based on exercise data of the user, predicting, based on the energy consumption of the user in the preset time interval and an obtained body weight change of the user in the preset time interval, energy consumption and a corresponding body weight change of the user in a future preset time interval, determining, based on the obtained energy consumption of the user, the obtained body weight change of the user, the predicted energy consumption, and the predicted body weight change, whether the user can complete an intended fitness plan, and correcting specified energy consumption of the user and a specified body weight change of the user in the preset time interval in the intended fitness plan based on a result of the determining.

In a first possible implementation, predicting, based on the energy consumption of the user in the preset time interval and an obtained body weight change of the user in the preset time interval, energy consumption and a corresponding body weight change of the user in a future preset time interval may include predicting, using a least square method based on the energy consumption of the user in the preset time interval and the obtained body weight change of the user in the preset time interval, the energy consumption and the corresponding body weight change of the user in the future preset time interval.

With reference to the foregoing possible implementation, in a second possible implementation, predicting, based on the energy consumption of the user in the preset time interval and an obtained body weight change of the user in the preset time interval, energy consumption and a corresponding body weight change of the user in a future preset time interval may include predicting the energy consumption of the user in the future preset time interval using a formula of Kt=w1×Kt−1+w2×Kt−2+w3×Kt−3+ . . . +wn×Kt−n, and calculating, using the predicted energy consumption Kt of the user in the future preset time interval and the body weight change of the user in the preset time interval, a body weight change corresponding to Kt, where Kt is predicted energy consumption of the user in the t^(th) preset time interval, n is a quantity of preset time intervals in which the user has actually exercised, Kt−n is energy consumption of the user in the (t−n)^(th) preset time interval, wn is a weight of the energy consumption of the user in the (t−n)^(th) preset time interval, and w1+w2+ . . . +wn=1.

With reference to the foregoing possible implementations, in a third possible implementation, the data processing method may further include recognizing an exercise movement of the user based on the collected exercise data of the user, comparing the exercise movement with a preset movement, and generating a movement correction instruction when the exercise movement does not match the preset movement to correct the exercise movement of the user.

With reference to the foregoing possible implementations, in a fourth possible implementation the exercise data of the user may include an amplitude of the exercise movement of the user, and comparing the exercise movement with a preset movement, and generating a movement correction instruction when the exercise movement does not match the preset movement to correct the exercise movement of the user may include comparing the amplitude of the exercise movement with an amplitude of the preset movement, and generating a movement correction guide instruction when the amplitude of the exercise movement exceeds a specified amplitude range of the preset movement to correct the exercise movement of the user.

With reference to the foregoing possible implementations, in a fifth possible implementation the exercise data of the user may include a frequency of the exercise movement of the user, and comparing the exercise movement with a preset movement, and generating a movement correction instruction when the exercise movement does not match the preset movement to correct the exercise movement of the user may include comparing the frequency of the exercise movement with a specified frequency range of the preset movement, and when the frequency of the exercise movement falls outside the specified frequency range of the preset movement, generating a movement correction instruction that includes a movement correction reminder message to correct the exercise movement of the user.

With reference to the foregoing possible implementations, in a sixth possible implementation the exercise data of the user may further include sign data of the user, and before generating a movement correction guide instruction when the amplitude of the exercise movement exceeds a specified amplitude range of the preset movement to correct the exercise movement of the user, the method may further include obtaining characteristic sign data of the user based on the sign data of the user, where the characteristic sign data includes shoulder position data and hip position data of the user, and locating a user plane based on the characteristic sign data.

With reference to the foregoing possible implementations, in a seventh possible implementation the data processing method further includes that when it is determined, based on the exercise data of the user, that the user fails to complete the specified energy consumption of the user in the preset time interval and is in an idle state, punishing the user according to a predetermined rule, and/or when it is determined, based on the exercise data of the user, that the user has completed the specified energy consumption of the user in the preset time interval, obtaining image data of the user in different periods from the exercise data of the user, and sending a reminder message to remind the user to forward the image data to a social networking platform.

According to a second aspect, a data processing apparatus is provided, which may include an actual energy calculation unit, a prediction unit, a determining unit, and a correction unit, where the actual energy calculation unit may be configured to calculate energy consumption of a user in a preset time interval based on exercise data of the user, the prediction unit may be configured to predict, based on the energy consumption of the user in the preset time interval and an obtained body weight change of the user in the preset time interval, energy consumption and a corresponding body weight change of the user in a future preset time interval, the determining unit may be configured to determine, based on the obtained energy consumption of the user, the obtained body weight change of the user, the predicted energy consumption, and the predicted body weight change, whether the user can complete an intended fitness plan, and the correction unit may be configured to correct specified energy consumption of the user and a specified body weight change of the user in the preset time interval in the intended fitness plan based on a result of the determining.

In a first possible implementation, the prediction unit may be further configured to predict, using a least square method based on the energy consumption of the user in the preset time interval and the obtained body weight change of the user in the preset time interval, the energy consumption and the corresponding body weight change of the user in the future preset time interval.

With reference to the foregoing possible implementation, in a second possible implementation, the prediction unit may be further configured to predict the energy consumption of the user in the future preset time interval using a formula of Kt=w1×Kt−1+w2×Kt−230 w3×Kt−3+ . . . +wn×Kt−n, and calculate, using the predicted energy consumption Kt of the user in the future preset time interval and the body weight change of the user in the preset time interval, a body weight change corresponding to Kt, where Kt is predicted energy consumption of the user in the t^(th) preset time interval, n is a quantity of preset time intervals in which the user has actually exercised, Kt−n is energy consumption of the user in the (t−n)^(th) preset time interval, wn is a weight of the energy consumption of the user in the (t−n)^(th) preset time interval, and w1+w2+ . . . +wn=1.

With reference to the foregoing possible implementation, in a third possible implementation, the data processing apparatus may further include an exercise movement recognizing unit and an exercise movement correction unit, where the exercise movement recognizing unit may be configured to recognize an exercise movement of the user based on the collected exercise data of the user, and the exercise movement correction unit may be configured to compare the exercise movement with a preset movement, and generate a movement correction instruction when the exercise movement does not match the preset movement to correct the exercise movement of the user.

With reference to the foregoing possible implementations, in a fourth possible implementation, the exercise data of the user may include an amplitude of the exercise movement of the user, and the exercise movement correction unit may be further configured to compare the amplitude of the exercise movement with an amplitude of the preset movement, and generate a movement correction guide instruction when the amplitude of the exercise movement exceeds a specified amplitude range of the preset movement to correct the exercise movement of the user.

With reference to the foregoing possible implementations, in a fifth possible implementation, the exercise data of the user may include a frequency of the exercise movement of the user, and the exercise movement correction unit may be further configured to compare the frequency of the exercise movement with a specified frequency range of the preset movement, and when the frequency of the exercise movement falls outside the specified frequency range of the preset movement, generate a movement correction instruction that includes a movement correction reminder message to correct the exercise movement of the user.

With reference to the foregoing possible implementations, in a sixth possible implementation, the exercise data of the user may further include sign data of the user, and the exercise movement correction unit may be further configured to obtain characteristic sign data of the user based on the sign data of the user, where the characteristic sign data includes shoulder position data and hip position data of the user, and locate a user plane based on the characteristic sign data.

With reference to the foregoing possible implementations, in a seventh possible implementation, the data processing apparatus may further include a punishment unit configured to, when it is determined, based on the exercise data of the user, that the user fails to complete the specified energy consumption of the user in the preset time interval and is in an idle state, punish the user according to a predetermined rule, and/or a forwarding unit configured to, when it is determined, based on the exercise data of the user, that the user has completed the specified energy consumption of the user in the preset time interval, obtain image data of the user in different periods from the exercise data of the user, and send a reminder message to remind the user to forward the image data to a social networking platform.

According to a third aspect, a fitness robot is provided, which may include the foregoing data processing apparatus.

In a first possible implementation, the fitness robot may further include an input apparatus configured to obtain exercise data of a user, connect to the data processing apparatus, and send the obtained exercise data of the user to the data processing apparatus, and an execution mechanism connected to the data processing apparatus, and configured to receive a movement correction instruction sent by the data processing apparatus and execute the movement correction instruction to correct a movement of the user.

With reference to the foregoing possible implementation, in a first possible implementation, the execution mechanism may be further configured to maintain a plane in which the fitness robot is located to be parallel to a user plane.

According to the data processing method and apparatus and the fitness robot provided in the embodiments of this application, the energy consumption of the user in the preset time interval is calculated based on the exercise data of the user, and the energy consumption and the corresponding body weight change of the user in the future preset time interval are predicted based on the energy consumption of the user in the preset time interval and the obtained body weight change of the user in the preset time interval. Accordingly, whether a fitness goal in the intended fitness plan can be achieved is determined, and the specified energy consumption of the user and the specified body weight change of the user in the preset time interval in the intended fitness plan are corrected based on a result of the determining.

This ensures that the fitness goal in the intended fitness plan can be achieved smoothly without requiring the user to manually adjust the fitness plan such that the user does not need to repeatedly input user information such as an original sign, a time to lose weight, and a personal preference to manually update the fitness plan. In addition, each adjustment of the fitness plan is based on the obtained exercise data of the user such that the corrected fitness plan is recorded as a fitness stage in an entire fitness history by which the user achieves the fitness goal. This is convenient for tracking a fitness status of the user.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic flowchart of a data processing method according to an embodiment of this application;

FIG. 2 is a schematic flowchart of a data processing method according to another embodiment of this application;

FIG. 3 is a schematic structural block diagram of a data processing apparatus according to an embodiment of this application;

FIG. 4 is a schematic structural block diagram of a data processing apparatus according to another embodiment of this application;

FIG. 5 is a schematic structural block diagram of computing device implementation of a data processing apparatus according to an embodiment of this application;

FIG. 6 is a schematic structural block diagram of a fitness robot according to an embodiment of this application;

FIG. 7 is a schematic structural block diagram of a fitness robot according to another embodiment of this application;

FIG. 8 is a schematic structural block diagram of a fitness robot according to still another embodiment of this application; and

FIG. 9 is a schematic flowchart of a fitness robot providing guidance on fitness for a user according to an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

It should be noted that the embodiments in this application and features of the embodiments may be mutually combined provided that no conflict exists. This application is described in detail in the following with reference to the accompanying drawings using embodiments. The embodiments of this application are described using processing of fitness data as an example.

FIG. 1 is a schematic flowchart of a data processing method according to an embodiment of this application. As shown in FIG. 1, the data processing method may include steps S110 to S140.

Step S110. Calculate energy consumption of a user in a preset time interval based on exercise data of the user, where the exercise data of the user may include a plurality of data types and is obtained in a plurality of manners.

In some examples, the exercise data of the user may include an exercise type, an exercise time, an exercise intensity, and the like of the user. The exercise data of the user may further include sign data of the user, for example, an age, a height, a gender, a body weight, and a heart rate. The exercise data of the user may further include other data about the user related to energy consumption during exercise or after exercise, for example, diet status data of the user and fitness preference data of the user.

In some examples, the exercise data of the user may be collected by various sensors included in different smart terminals. For example, an acceleration sensor, a gyroscope, or the like embedded in a mobile phone or a tablet computer can sense a movement of the user, or the exercise data of the user is obtained using a sign data sensor. For example, the exercise data of the user may alternatively be obtained using a smart wearable device, for example, a sports band, a smart sports headset, or a smart sports suit. Certainly, the exercise data of the user may alternatively be directly input by the user.

In some examples, the preset time interval is merely used as a time unit for collecting statistics about energy consumption of the user in a unit time. Therefore, the preset time interval may be in various time units. For example, the preset time interval may be one day, one week, or in hours. No limitation is set herein.

Step S120. Predict, based on the energy consumption of the user in the preset time interval and an obtained body weight change of the user in the preset time interval, energy consumption and a corresponding body weight change of the user in a future preset time interval.

In some examples, the obtained body weight change of the user in the preset time interval may be obtained through calculation based on the obtained energy consumption of the user in the preset time interval, or may be directly obtained through measurement.

In some examples, the energy consumption and the corresponding body weight change of the user in the future preset time interval may be predicted in various manners based on the energy consumption of the user in the preset time interval and the obtained body weight change of the user in the preset time interval. For example, the energy consumption and the corresponding body weight change of the user in the future preset time interval may be predicted using a least square method, a classification algorithm, or a neural network algorithm.

Step S130. Determine, based on the obtained energy consumption of the user, the obtained body weight change of the user, the predicted energy consumption, and the predicted body weight change, whether the user can complete an intended fitness plan.

In some examples, the intended fitness plan may be manually formulated by the user, or may be obtained through analysis using collected user data in combination with fitness-related data that exists or that is collected from a network server.

In an example, data input by the user is as follows: body weight: 60 kilograms (kg), gender: female, and fitness goal: to reduce 2.5 kg in 30 days. Then, average energy B (in a unit of calorie) that needs to be consumed daily can be calculated based on the fitness goal, where B=2.5÷30×7000, and 7000 herein is calories consumed for losing every 1 kg of weight.

Then, target calories E calories that the user needs to consume through exercise are calculated based on C calories that indicate a calorie intake status of a diet input by the user and D calories for daily basic metabolism and exercise consumption: E=B−D+C.

Then, a corresponding sports item is selected based on a sports preference input by the user or a sports preference (for example, running or yoga) sensed by a smart terminal using a sensor over a long time.

For example, the corresponding sports item may be selected and then confirmed with the user, and a daily exercise time of the user is calculated based on the target calories E calories that the user needs to consume through exercise and a correspondence between various sports and consumed calories, to formulate the intended fitness plan for the user. For example, the target calories E calories of the user are 350 calories, and the sports preference is aerobics. Assuming that average energy hourly consumed by aerobics is 350 calories, it can be calculated that the daily exercise time is one hour.

Step S140. Correct specified energy consumption of the user and a specified body weight change of the user in the preset time interval in the intended fitness plan based on a result of the determining.

In some examples, total energy that can be consumed by the user and an overall body weight change at a moment when the intended fitness plan is completed can be calculated using the predicted energy consumption and the predicted body weight change. The total energy that can be consumed and the overall body weight change that are obtained through the calculation are compared with the fitness goal in the intended fitness plan.

For example, if the total energy that can be consumed and the overall body weight change that are obtained through the calculation are less than energy consumption and a body weight change in the fitness goal in the intended fitness plan, the specified energy consumption of the user and the specified body weight change of the user in the preset time interval in the intended fitness plan need to be corrected for a remaining time of the intended fitness plan, to achieve the fitness goal set in the intended fitness plan.

Using the data processing method, the energy consumption of the user in the preset time interval can be calculated using the obtained exercise data of the user, and the energy consumption and the corresponding body weight change of the user in the future preset time interval are predicted based on the energy consumption of the user in the preset time interval and the obtained body weight change of the user in the preset time interval. Accordingly, whether the fitness goal in the intended fitness plan can be achieved is determined, and the specified energy consumption of the user and the specified body weight change of the user in the preset time interval in the intended fitness plan are corrected based on a result of the determining.

This ensures that the intended fitness goal in the intended fitness plan can be achieved smoothly without requiring the user to manually adjust the fitness plan such that the user does not need to repeatedly input user information such as an original sign, a time to lose weight, and a personal preference to manually update the fitness plan. In addition, each adjustment of the fitness plan is based on the obtained exercise data of the user such that the corrected fitness plan is recorded as a fitness stage in an entire fitness history by which the user achieves the fitness goal. This is convenient for tracking a fitness status of the user.

According to some embodiments, step S120 may include that the energy consumption of the user in the future preset time interval may be predicted using a formula of Kt=w1×Kt−1+w2×Kt−2+w3×Kt−3+ . . . +wn×Kt−n, and a body weight change corresponding to Kt may be calculated using the predicted energy consumption Kt of the user in the future preset time interval and the body weight change of the user in the preset time interval, where Kt is predicted energy consumption of the user in the t^(th) preset time interval, n is a quantity of preset time intervals in which the user has actually exercised, Kt−n is energy consumption of the user in the (t−n)^(th) preset time interval, wn is a weight of the energy consumption of the user in the (t−n)^(th) preset time interval, and w1+w2+ . . . +wn=1.

In some examples of the foregoing embodiment, for example, the preset time interval is a time of one day. Calories Kn (where n is a quantity of days in which the user has actually exercised) actually consumed daily by the user and a weight Wn (for example, in a unit of kg) actually lost daily are obtained. After exercise for a stage of n days (for example, if the user has actually exercised for 10 days, n=10), a body weight change and energy consumption of the user in the t^(th) day may be directly predicted through calculation using a least square method as in formula (1):

Wt=a+b×Kt  (1),

where coefficients a and b may be obtained through calculation using formulas (2) and (3):

a=(ΣWn)/n−b×(ΣKn)/n  (2);

b=[n×Σ(Kn×Wn)−(ΣKn×ΣWn)]/(n×ΣKn2−ΣKn×ΣWn)  (3).

The energy consumption of the user in the t^(th) day may be obtained through calculation using a formula (4):

Kt=w1×Kt−1+w2×Kt−2+w3×Kt−3+ . . . +wn×Kt−n  (4).

In the formula (4), Kt is the predicted energy consumption of the user in the t^(th) day, n is the quantity of days in which the user has actually exercised, Kt−n is energy consumption of the user in the (t−n)^(th) day, wn is a weight of the energy consumption of the user in the (t−n)^(th) day, and w1+w2+ . . . +wn=1.

In some examples, the weight wn may be obtained using an empirical method. For example, an average weight manner may be initially used for calculation, and then adjustment may be made based on accuracy of predicted data.

In some other examples of the foregoing embodiment, e.g., in steps S130 and S140 include the following.

After it is predicted that the user loses a weight of Wt after exercising in the t^(th) day, a value Wf of a total weight lost by the user until a deadline of the intended fitness plan may be predicted through calculation, where Wf=ΣWt, t=T, and T is a total quantity of days in the fitness plan. Wf may be compared with an original target weight loss value W in the intended fitness plan to obtain a deviation value using a formula of φ=−Wf.

In some examples, an intended daily weight loss target Wt may be corrected using a formula of Wt-corrected=Wt+φ/(T−n).

In some examples, calories Kt-corrected that should be subsequently consumed daily may be re-predicted using the formula (1), and the fitness plan is re-adjusted based on Kt-corrected.

FIG. 2 is a schematic flowchart of a data processing method according to another embodiment of this application. As shown in FIG. 2, the data processing method may further include steps S210 and S220.

Step S210. Recognize an exercise movement of a user based on collected exercise data of the user.

In step S210, the exercise movement of the user may be recognized in a plurality of manners based on the collected exercise data of the user. In some examples, movement data such as a movement angle, a movement amplitude, a movement frequency, and a movement strength of the user or sign data such as a heart rate during exercise, consumed calories, and a body shape of the user may be collected using a sensor, a camera, or a wearable device.

For example, a real-time movement of the user may be obtained using one or more cameras, and an effective exercise feature (for example, parameters such as a dynamic feature of the user, a body shape feature of the user, or a depth of field) is extracted from a video, and a movement, a position, a posture, and the like of the user are recognized by creating a human body motion model.

For example, data such as the heart rate during exercise and the consumed calories of the user may be collected in real time by the wearable device.

Step S220. Compare the exercise movement with a preset movement, and generate a movement correction instruction when the exercise movement does not match the preset movement to correct the exercise movement of the user.

In some examples, the preset movement in step S220 may be related fitness movement training model data downloaded from a cloud server.

Based on the foregoing examples, the recognized exercise movement of the user may be matched with the fitness movement training model data, and whether the movement of the user is correct is determined according to different fitness exercise scenarios. If the movement of the user is incorrect, the movement correction instruction is generated to correct the exercise movement of the user.

In some examples, the exercise data of the user may include an amplitude of the exercise movement of the user. In this case, step S220 may include comparing the amplitude of the exercise movement with an amplitude of the preset movement, and generating a movement correction guide instruction when the amplitude of the exercise movement exceeds a specified amplitude range of the preset movement, to correct the exercise movement of the user.

In some other examples, the exercise data of the user may include a frequency of the exercise movement of the user. In this case, step S220 may include comparing the frequency of the exercise movement with a specified frequency range of the preset movement, and generating a movement correction instruction that includes a movement correction reminder message to correct the exercise movement of the user when the frequency of the exercise movement falls outside the specified frequency range of the preset movement.

For example, in a scenario 1:

If a deviation rate of a fitness movement, for example, abdominal training, chest expanding, or strength training using equipment, exceeds a preset threshold (as shown in Table 1), it is determined that the fitness movement is unqualified. For example, if a frequency of the movement is 15 times per minute, it is determined that the movement is unqualified, and a movement correction instruction that includes a movement correction reminder message is generated to correct the exercise movement of the user, for example, to notify the user of the frequency of the movement being performed and remind the user to increase the frequency of the movement.

TABLE 1 Movement feature comparison table Preset Result of Deviation rate Result of movement recognizing (preset to 5%) determining Angle of a Both feet Both feet 11.1% Unqualified movement lifted by lifted by 45 degrees 40 degrees Frequency of 60 times 58 times 3.3% Qualified the movement per minute per minute

For example, in a scenario 2:

For a fitness movement such as a yoga movement, whether a position arriving degree of a movement of the user is qualified is determined based on information about the user such as an age, a gender, and a historical training degree. If the movement of the user is unqualified, a movement correction instruction may be generated to correct the exercise movement of the user.

In some examples, if the user constantly fails to complete a correct movement in a short time, a preset threshold may alternatively be lowered, or the fitness plan may be adjusted and some fitness exercises less difficult or less intense are selected for the user.

To reduce a difficulty in recognizing the exercise movement of the user and simplify the movement correction instruction, the collected exercise data of the user may further include sign data of the user. Before step S220, the method may further include obtaining characteristic sign data of the user based on the sign data of the user, where the characteristic sign data includes shoulder position data and hip position data of the user, and locating a user plane based on the characteristic sign data.

In some examples, the exercise movement of the user may be divided into an upper limb movement and a lower limb movement. A movement comparison plane of the upper limb movement of the user may be located by recognizing a shoulder position of the user. The exercise movement of the user may be recognized based on the movement comparison plane, and a movement correction instruction is generated. This simplifies dimension data for user recognition and correction instruction generation, thereby reducing the difficulty in recognizing the exercise movement of the user and simplifying the movement correction instruction.

According to some embodiments, the data processing method further includes that when it is determined, based on the exercise data of the user, that the user fails to complete specified energy consumption of the user in a preset time interval and is in an idle state, punishing the user according to a predetermined rule. For example, energy consumption of the user in one day is calculated based on the exercise data of the user. When the energy consumption is less than the specified energy consumption, and it is determined, based on the exercise data of the user, that the user is currently in an idle state, the user may be punished according to the predetermined rule. For example, the user is made to send an ugly photo of the user to a social networking platform, or the like.

In some examples of the foregoing embodiment, the data processing method further includes that when it is determined, based on the exercise data of the user, that the user has completed the specified energy consumption of the user in the preset time interval, obtaining image data of the user in different periods from the exercise data of the user, and sending a reminder message to remind the user to forward the image data to a social networking platform. In some examples, the preset time interval may be a plurality of time units, or may be a combination of a plurality of preset time intervals, for example, an entire planned fitness cycle. The image data in different periods may be, for example, photos or videos of the user before exercise, during exercise, and after exercise. Using the foregoing method, a process in which the user executes the fitness plan can be effectively monitored, thereby improving willingness of the user to exercise.

The foregoing describes in detail the data processing method according to the embodiments of this application with reference to FIG. 1 and FIG. 2. The following describes in detail a data processing apparatus, and a fitness robot according to the embodiments of this application with reference to FIG. 3 to FIG. 9.

FIG. 3 is a schematic structural block diagram of a data processing apparatus according to an embodiment of this application. As shown in FIG. 3, the data processing apparatus 300 may include an actual energy calculation unit 310, a prediction unit 320, a determining unit 330, and a correction unit 340.

The actual energy calculation unit 310 may be configured to calculate energy consumption of a user in a preset time interval based on obtained exercise data of the user.

The prediction unit 320 may be configured to predict, based on the energy consumption of the user in the preset time interval and an obtained body weight change of the user in the preset time interval, energy consumption and a corresponding body weight change of the user in a future preset time interval.

The determining unit 330 may be configured to determine, based on the obtained energy consumption of the user, the obtained body weight change of the user, the predicted energy consumption, and the predicted body weight change, whether the user can complete an intended fitness plan.

The correction unit 340 may be configured to correct specified energy consumption of the user and a specified body weight change of the user in the preset time interval in the intended fitness plan based on a result of the determining.

The data processing apparatus 300 according to this embodiment of this application may correspond to an entity for executing the data processing method according to the embodiments of this application. The foregoing functions of the units in the data processing apparatus 300 are respectively intended to implement corresponding processes in the methods in FIG. 1 and FIG. 2. For brevity, details are not described herein again.

Using the data processing apparatus, the energy consumption of the user in the preset time interval can be calculated using the obtained exercise data of the user, and the energy consumption and the corresponding body weight change of the user in the future preset time interval are predicted based on the energy consumption of the user in the preset time interval and the obtained body weight change of the user in the preset time interval. Accordingly, whether a fitness goal in the intended fitness plan can be achieved is determined, and the specified energy consumption of the user and the specified body weight change of the user in the preset time interval in the intended fitness plan are corrected based on a result of the determining.

This ensures that the intended fitness goal in the intended fitness plan can be achieved smoothly without requiring the user to manually adjust the fitness plan such that the user does not need to repeatedly input user information such as an original sign, a time to lose weight, and a personal preference to manually update the fitness plan. In addition, each adjustment of the fitness plan is based on the obtained exercise data of the user such that the corrected fitness plan is recorded as a fitness stage in an entire fitness history by which the user achieves the fitness goal. This is convenient for tracking a fitness status of the user.

In some examples, the prediction unit 320 may be further configured to predict the energy consumption of the user in the future preset time interval using a formula of Kt=w1×Kt−1+w2×Kt−2+w3×Kt−3+ . . . +wn×Kt−n, and calculate, using the predicted energy consumption Kt of the user in the future preset time interval and the body weight change of the user in the preset time interval, a body weight change corresponding to Kt.

FIG. 4 is a schematic structural block diagram of a data processing apparatus according to another embodiment of this application. As shown in FIG. 4, the data processing apparatus 400 may include an actual energy calculation unit 410, a prediction unit 420, a determining unit 430, a correction unit 440, an exercise movement recognizing unit 450, and an exercise movement correction unit 460.

Functions of the actual energy calculation unit 410, the prediction unit 420, the determining unit 430, and the correction unit 440 are similar to the functions of the actual energy calculation unit 310, the prediction unit 320, the determining unit 330, and the correction unit 340 in FIG. 3.

The exercise movement recognizing unit 450 may be configured to recognize an exercise movement of a user based on collected exercise data of the user.

The exercise movement correction unit 460 may be configured to compare the exercise movement with a preset movement, and generate a movement correction instruction when the exercise movement does not match the preset movement to correct the exercise movement of the user.

In some examples, the exercise movement correction unit 460 may be further configured to compare an amplitude of the exercise movement with an amplitude of the preset movement, and generate a movement correction guide instruction when the amplitude of the exercise movement exceeds a specified amplitude range of the preset movement to correct the exercise movement of the user.

In some examples, the exercise data of the user may include a frequency of the exercise movement of the user.

The exercise movement correction unit 460 may be further configured to compare the frequency of the exercise movement with a specified frequency range of the preset movement, and when the frequency of the exercise movement falls outside the specified frequency range of the preset movement, generate a movement correction instruction that includes a movement correction reminder message to correct the exercise movement of the user.

In some examples, the exercise data of the user may include sign data of the user.

The exercise movement correction unit 460 may be further configured to obtain characteristic sign data of the user based on the sign data of the user, where the characteristic sign data includes shoulder position data and hip position data of the user, and locate a user plane based on the characteristic sign data.

According to some embodiments, the data processing apparatus 460 further includes a punishment unit (not shown) configured to, when it is determined, based on the exercise data of the user, that the user fails to complete specified energy consumption of the user in a preset time interval and is in an idle state, punish the user according to a predetermined rule. For example, energy consumption of the user in one day is calculated based on the exercise data of the user. When the energy consumption is less than the specified energy consumption, and it is determined, based on the exercise data of the user, that the user is currently in an idle state, the user may be punished according to the predetermined rule. For example, the user is made to send an ugly photo of the user to a social networking platform, or the like. For example, a punishment item to be inflicted on the user is notified by voice or displayed on a screen, and user data is collected using an input apparatus to monitor whether the user has completed the punishment.

In some examples of the foregoing embodiment, the data processing apparatus 400 further includes a forwarding unit (not shown) configured to, when it is determined, based on the exercise data of the user, that the user has completed the specified energy consumption of the user in the preset time interval, obtain image data of the user in different periods from the exercise data of the user, and send a reminder message to remind the user to forward the image data to a social networking platform. In some examples, the preset time interval may be a plurality of time units, or may be a combination of a plurality of preset time intervals, for example, an entire planned fitness cycle. The image data in different periods may be, for example, photos or videos of the user before exercise, during exercise, and after exercise. Using the punishment unit and/or the forwarding unit, a process in which the user executes the fitness plan can be effectively monitored, thereby improving willingness of the user to exercise.

FIG. 5 is a schematic structural block diagram of computing device implementation of a data processing apparatus according to an embodiment of this application. As shown in FIG. 5, at least a part of the foregoing data processing method and data processing apparatus may be implemented by a computing device 500. The computing device 500 includes a processor 503, a memory 504, and a bus 510.

In some examples, the computing device 500 may further include an input device 501, an input port 502, an output port 505, and an output device 506. The input port 502, the processor 503, the memory 504, and the output port 505 are connected to each other using the bus 510. The input device 501 and the output device 506 are respectively connected to the bus 510 using the input port 502 and the output port 505, to be connected to other components of the computing device 500.

It should be noted that an output interface and an input interface herein may alternatively be represented using an input/output (I/O) interface. Further, the input device 501 receives input information from external, and transfers the input information to the processor 503 using the input port 502. The processor 503 processes the input information based on a computer executable instruction stored in the memory 504 to generate output information, stores the output information temporarily or permanently in the memory 504, and then transfers the output information to the output device 506 using the output port 505. The output device 506 outputs the output information to the external of the computing device 500.

Compared with the foregoing data processing apparatus, some users prefer a fitness robot that can accompany them in exercise. FIG. 6 is a schematic structural block diagram of a fitness robot according to an embodiment of this application. As shown in FIG. 6, the fitness robot 600 may include the data processing apparatus 300.

Using the fitness robot, energy consumption of a user in a preset time interval can be calculated using obtained exercise data of the user, and energy consumption and a corresponding body weight change of the user in a future preset time interval are predicted based on the energy consumption of the user in the preset time interval and an obtained body weight change of the user in the preset time interval. Accordingly, whether a fitness goal in an intended fitness plan can be achieved is determined, and specified energy consumption of the user and a specified body weight change of the user in the preset time interval in the intended fitness plan are corrected based on a result of the determining.

This ensures that the intended fitness goal in the intended fitness plan can be achieved smoothly without requiring the user to manually adjust the fitness plan such that the user does not need to repeatedly input user information such as an original sign, a time to lose weight, and a personal preference to manually update the fitness plan. In addition, each adjustment of the fitness plan is based on the obtained exercise data of the user such that the corrected fitness plan is recorded as a fitness stage in an entire fitness history by which the user achieves the fitness goal. This is convenient for tracking a fitness status of the user.

FIG. 7 is a schematic structural block diagram of a fitness robot according to another embodiment of this application. As shown in FIG. 7, the fitness robot 700 includes an input apparatus 710, a data processing apparatus 720, and an execution mechanism 730.

The input apparatus 710 is configured to obtain exercise data of a user, connect to the data processing apparatus 720, and send the obtained exercise data of the user to the data processing apparatus 720.

The input apparatus 710 may be a device such as a wearable device, a camera, or a sensor that can collect the exercise data of the user, or a communications unit configured to receive the exercise data of the user sent by the foregoing device.

The execution mechanism 730 is connected to the data processing apparatus 720, and may be configured to receive a movement correction instruction sent by the data processing apparatus 720 and execute the movement correction instruction to correct a movement of the user.

To reduce a difficulty in recognizing an exercise movement of the user and simplify the movement correction instruction, in some examples, the execution mechanism 730 of the fitness robot 700 may be further configured to maintain a plane in which the fitness robot 700 is located to be parallel to the user plane after the data processing apparatus 720 locates a user plane.

For example, a movement comparison plane for a lower limb movement of the user may be located as the user plane by recognizing a hip position of the user. The data processing apparatus 720 sends a movement instruction to the execution mechanism 730 to maintain the plane in which the fitness robot 700 is located to be parallel to the user plane. For example, the fitness robot 700 is always maintained to directly face the user plane. This enables the fitness robot 700 to recognize and correct the exercise movement of the user in only two dimensions in the movement comparison plane, thereby reducing the difficulty in recognizing the exercise movement of the user and simplifying the movement correction instruction.

FIG. 8 is a schematic structural block diagram of a fitness robot according to still another embodiment of this application. As shown in FIG. 8, the fitness robot may include a mainboard 810 and other peripheral functional components. A sensor module group 801 and a button 802 are separately connected to an I/O module of the mainboard 810. A microphone array 803 is connected to an audio and video codec module of the mainboard 810. A touch display controller of the mainboard 810 may receive a touch control input of a touch display screen 804 and provide a display driving signal. A motor servo controller may drive, based on a program instruction, a motor and an encoder 807 to drive a mechanical leg/mechanical arm 811 to produce movement and body language of the robot. Voice can be output by an audio codec module, pushed to a speaker 812 via a power amplifier 808, and played by the speaker 812.

The mainboard 810 may further include a processor and a memory. In addition to storing a computer executable instruction for executing the foregoing data processing method and a configuration file thereof, the memory may also include audio, video, and image files and the like required by the fitness robot to perform fitness coaching work, and may further include some temporary files for program running. A communications module 806 of the mainboard 810 provides a function for the robot to communicate with an external network, and may be, for example, a BLUETOOTH or WI-FI module for short-distance wireless communication. The mainboard 810 may further include a power management module. The power management module implements, using a connected power system 805, battery charging and discharging and power-saving management of a device.

In some examples, when the processor in the fitness robot shown in FIG. 8 performs the foregoing data processing method, the processor receives, using the I/O module, exercise data of a user sent by the sensor module group 801, the microphone array 803, and the touch display screen 804. Based on the computer executable instruction stored in the memory, the processor calculates energy consumption of the user in a preset time interval based on the exercise data of the user, predicts, based on the energy consumption of the user in the preset time interval and an obtained body weight change of the user in the preset time interval, energy consumption and a corresponding body weight change of the user in a future preset time interval, determines, based on the obtained energy consumption of the user, the obtained body weight change of the user, the predicted energy consumption, and the predicted body weight change, whether the user can complete an intended fitness plan, and corrects specified energy consumption of the user and a specified body weight change of the user in the preset time interval in the intended fitness plan based on a result of the determining. Then, the processor outputs, as needed based on a corrected fitness plan via the speaker 812 or the touch display screen 804 or by driving the mechanical leg/mechanical arm 811, a corresponding fitness instruction to provide guidance on fitness for the user.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual needs to achieve the objectives of the solutions in the embodiments of this application.

FIG. 9 is a schematic flowchart of a fitness robot providing guidance on fitness for a user according to an embodiment of this application. As shown in FIG. 9, a process in which the fitness robot provides guidance on fitness for the user may include the following steps.

Step S910. Obtain sign information (including a height, a weight, a body shape, fat content, a resting heart rate, and the like) of the user through scanning or user input, obtain diet and fitness preferences (for example, a preference for a vegetarian diet, liking strength training, and the like) of the user, obtain a fitness goal (for example, to lose a weight of 2.5 kg in one month) of the user, and make an intended fitness plan for the user based on the foregoing user data.

Step S920. The fitness robot may make a recommended daily recipe based on a fitness requirement of the user, track a diet of the user, and provide real-time diet data analysis, for example, calculate a calorie input status of the user by scanning the diet of the user, and may perform tracking with assistance of another smart device of the user, for example, a mobile phone or a wearable device.

Step S930. Track an exercise status of the user, analyze exercise data of the user, and track the intended fitness plan of the user with assistance of another device of the user, for example, a mobile phone or a wearable device.

Step S940. Predict a completion status of the intended fitness plan of the user in the future based on fitness data of the user, and adjust the intended fitness plan in time when it is predicted that the intended fitness plan cannot be completed.

Step S950. Accompany the user during exercise, and recognize and correct an exercise movement of the user based on the exercise data of the user.

Step S960. Determine whether the user is in an idle state based on the exercise data of the user.

Step S970. Remind or punish the user when it is determined, with reference to the intended fitness plan of the user, that the user fails to complete specified energy consumption of the user in a preset time interval and is in an idle state.

The foregoing descriptions are merely specific implementations of this application, but are not intended to limit the protection scope of this application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in this application shall fall within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims. 

What is claimed is:
 1. A data processing method, comprising: calculating first energy consumption of a user in a preset time interval based on exercise data of the user; obtaining a first body weight change of the user in the preset time interval; predicting, based on the first energy consumption and the first body weight change, second energy consumption and a second body weight change of the user in a future preset time interval; obtaining, based on the first energy consumption, the first body weight change, the second energy consumption, and the second body weight change, a result indicating the user capability of completing an intended fitness plan; and correcting a specified energy consumption of the user and a specified body weight change of the user in the preset time interval in the intended fitness plan based on the result.
 2. The data processing method of claim 1, wherein predicting the second energy consumption and the second body weight change comprises predicting, using a least square method based on the first energy consumption and the first body weight change, the second energy consumption and the second body weight change.
 3. The data processing method of claim 1, wherein predicting the second energy consumption and the second body weight change comprises: predicting the second energy consumption using a formula of Kt=w1×Kt−1+w2×Kt−2+w3×Kt−3+ . . . +wn×Kt−n, wherein Kt is second energy consumption of the user in a t^(th) preset time interval, wherein n is a quantity of preset time intervals in which the user has exercised, wherein Kt−n is first energy consumption of the user in a (t−n)^(th) preset time interval, wherein wn is a weight of the first energy consumption of the user in the (t−n)^(th) preset time interval, wherein w1 is a weight of first energy consumption of the user in a (t−l)^(st) preset time interval, and wherein w1+w2+ . . . +wn=one; and calculating, using the second energy consumption predicted using the formula of Kt and the first body weight change, a second body weight change corresponding to the second energy consumption predicted using the formula of Kt.
 4. The data processing method of claim 1, further comprising: recognizing an exercise movement of the user based on the exercise data; comparing the exercise movement with a preset movement; and generating a movement correction instruction to correct the exercise movement when the exercise movement does not match the preset movement.
 5. The data processing method of claim 4, wherein the exercise data comprises an amplitude of the exercise movement, and wherein comparing the exercise movement and generating the movement correction instruction comprises: comparing the amplitude of the exercise movement with an amplitude of the preset movement; and generating a movement correction guide instruction to correct the exercise movement when the amplitude of the exercise movement exceeds a specified amplitude range of the preset movement.
 6. The data processing method of claim 5, wherein the exercise data further comprises sign data of the user, and wherein before generating the movement correction guide instruction, the data processing method further comprises: obtaining characteristic sign data of the user based on the sign data of the user, wherein the characteristic sign data comprises shoulder position data and hip position data of the user; and locating a user plane based on the characteristic sign data.
 7. The data processing method of claim 4, wherein the exercise data comprises a frequency of the exercise movement, and wherein comparing the exercise movement and generating the movement correction instruction comprises: comparing the frequency of the exercise movement with a specified frequency range of the preset movement; and generating a movement correction instruction comprising a movement correction reminder message to correct the exercise movement when the frequency of the exercise movement falls outside the specified frequency range of the preset movement.
 8. The data processing method of claim 1, further comprising: determining, based on the exercise data of the user, that the user fails to complete the specified energy consumption of the user in the preset time interval and is in an idle state; and punishing the user according to a predetermined rule.
 9. The data processing method of claim 1, further comprising: determining, based on the exercise data of the user, that the user has completed the specified energy consumption of the user in the preset time interval; obtaining image data of the user in different periods from the exercise data of the user; and sending a reminder message reminding the user to forward the image data to a social networking platform.
 10. A data processing apparatus, comprising: a memory configured to store instructions; and a processor coupled to the memory, wherein the instructions cause the processor to be configured to: calculate first energy consumption of a user in a preset time interval based on exercise data of the user; obtain a first body weight change of the user in the preset time interval; predict, based on the first energy consumption and the first body weight change, second energy consumption and a second body weight change of the user in a future preset time interval; obtain, based on the first energy consumption, the first body weight change, the second energy consumption, and the second body weight change, a result indicating the user capability of completing an intended fitness plan; and correct specified energy consumption of the user and a specified body weight change of the user in the preset time interval in the intended fitness plan based on the result.
 11. The data processing apparatus of claim 10, wherein the instructions further cause the processor to be configured to predict, using a least square method based on the first energy consumption and the first body weight change, the second energy consumption and the second body weight change.
 12. The data processing apparatus of claim 10, wherein the instructions further cause the processor to be configured to: predict the second energy consumption using a formula of Kt=w1×Kt−1+w2×Kt−2+w3×Kt−3+ . . . +wn×Kt−n, wherein Kt is second energy consumption of the user in a t^(th) preset time interval, wherein n is a quantity of preset time intervals in which the user has exercised, wherein Kt−n is first energy consumption of the user in a (t−n)^(th) preset time interval, wherein wn is a weight of the energy consumption of the user in the (t−n)^(th) preset time interval, and wherein w1+w2+ . . . +wn=one; and calculate, using the second energy consumption predicted using the formula Kt and the first body weight change, a second body weight change corresponding to the second energy consumption predicted using the formula Kt.
 13. The data processing apparatus of claim 10, wherein the instructions further cause the processor to be configured to: recognize an exercise movement of the user based on the exercise data; compare the exercise movement with a preset movement; and generate a movement correction instruction to correct the exercise movement when the exercise movement does not match the preset movement.
 14. The data processing apparatus of claim 13, wherein the exercise data comprises an amplitude of the exercise movement, and wherein the instructions further cause the processor to be configured to: compare the amplitude of the exercise movement with an amplitude of the preset movement; and generate a movement correction guide instruction to correct the exercise movement when the amplitude of the exercise movement exceeds a specified amplitude range of the preset movement.
 15. The data processing apparatus of claim 14, wherein the exercise data further comprises sign data of the user, and wherein the instructions further cause the processor to be configured to: obtain characteristic sign data of the user based on the sign data, wherein the characteristic sign data comprises shoulder position data and hip position data of the user; and locate a user plane based on the characteristic sign data.
 16. The data processing apparatus of claim 13, wherein the exercise data comprises a frequency of the exercise movement, and wherein the instructions further cause the processor to be configured to: compare the frequency of the exercise movement with a specified frequency range of the preset movement; and generate a movement correction instruction comprising a movement correction reminder message to correct the exercise movement when the frequency of the exercise movement falls outside the specified frequency range of the preset movement.
 17. The data processing apparatus of claim 10, wherein the instructions further cause the processor to be configured to: determine, based on the exercise data of the user, that the user fails to complete the specified energy consumption of the user in the preset time interval and is in an idle state; and punish the user according to a predetermined rule.
 18. The data processing apparatus of claim 10, wherein the instructions further cause the processor to be configured to: determine, based on the exercise data of the user, that the user has completed the specified energy consumption of the user in the preset time interval; obtain image data of the user in different periods from the exercise data; and send a reminder message reminding the user to forward the image data to a social networking platform.
 19. A fitness robot, comprising a data processing apparatus, wherein the data processing apparatus comprises: a memory configured to store instructions; and a processor coupled to the memory, wherein the instructions cause the processor to be configured to: calculate first energy consumption of a user in a preset time interval based on exercise data of the user; obtain a first body weight change of the user in the preset time interval; predict, based on the first energy consumption and the first body weight change, second energy consumption and a second body weight change of the user in a future preset time interval; obtain, based on the first energy consumption, the first body weight change, the second energy consumption, and the second body weight change, a result indicating the user capability of completing an intended fitness plan; and correct specified energy consumption of the user and a specified body weight change of the user in the preset time interval in the intended fitness plan based on the result.
 20. The fitness robot of claim 19, further comprising: an input apparatus coupled to the data processing apparatus and configured to: obtain the exercise data; and send the exercise data to the data processing apparatus; and an execution apparatus coupled to the data processing apparatus and configured to: receive a movement correction instruction from the data processing apparatus; and execute the movement correction instruction to correct a movement of the user. 